import request from '@/utils/request'

export function getMenus(data) {
  return request({
    url: '/menu/page',
    method: 'get',
    params: data
  })
}

export function getMenuInfo(data) {
  return request({
    url: '/menu/info',
    method: 'get',
    params: data
  })
}

export function addMenu(data) {
  return request({
    url: '/menu/add',
    method: 'post',
    data
  })
}

export function updateMenu(data) {
  return request({
    url: `/menu/edit`,
    method: 'put',
    data: data
  })
}

export function deleteMenu(id) {
  return request({
    url: `/menu/del`,
    method: 'delete',
    params: id
  })
}
